{extend name='layout/default'/}
{block name='main'}
<div id="control">
    {include file='admin/menu' /}
    <div class="rightControl">
        <div style="display: grid;grid-template-columns: repeat(4,1fr);gap: 15px;">
            <div class="stats shadow" style="background: #1e9fff">
                <div class="stat">
                    <div class="stat-title">用户数量</div>
                    <div class="stat-value">{:number_format($userCount, 0, '.', ',')}</div>
                </div>
            </div>
            <div class="stats shadow" style="background: #16baaa">
                <div class="stat">
                    <div class="stat-title">图片总数</div>
                    <div class="stat-value">{:number_format($imageCount, 0, '.', ',')}</div>
                </div>
            </div>
            <div class="stats shadow" style="background: #31bdec">
                <div class="stat">
                    <div class="stat-title">已用储存</div>
                    <div class="stat-value">{:formatSize($imageSize)}</div>
                </div>
            </div>
            <div class="stats shadow" style="background: #ffb800">
                <div class="stat">
                    <div class="stat-title">今日上传</div>
                    <div class="stat-value">{:formatSize($imageSizeToday)}</div>
                </div>
            </div>
        </div>
    </div>
</div>
<style>
    *{
        user-select: none;
    }
    .stats {
        display: inline-grid;
        color: #fff;
        border-radius: 1rem;
        border: 3px solid #FFFFFF;
    }

    .shadow {
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    }

    .stat {
        display: inline-grid;
        width: 100%;
        grid-template-columns: repeat(1, 1fr);
        column-gap: 1rem;
        padding: 1rem 1.5rem;
    }

    .stat-title {
        grid-column-start: 1;
        white-space: nowrap;
        color: #fff;
    }

    .stat-value {
        grid-column-start: 1;
        white-space: nowrap;
        font-size: 2.25rem;
        line-height: 2.5rem;
        font-weight: 800;
    }
</style>
{/block}